print('Print all numbers in [1, n] that can be divided exactly by 3 or 4:')

n = int(input('Input n: '))

for i in range(1, n+1):
    if i % 3 == 0 or i % 4 == 0: 
        print(i, end=' ')

print('\n')
